<%@page import="java.text.SimpleDateFormat"%>
<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8" %>
  <%@ page import="java.util.Date" %>  
 <%@ page import="java.sql.*,common.DBUtil" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>主页</title>
</head>
<body background="..\images\building.jpg">

 <%
//获取当前日期
 Date today = new Date();
 SimpleDateFormat ft = new SimpleDateFormat("yyyy年MM月dd日  HH:MM:ss");
 //获取在线人数(获取计数器)
 String cournter=(String)application.getAttribute("cournter");
 String uname = request.getParameter("uname");//获取账号
 %>
 欢迎<%=uname%>来到新闻发布系统，系统正在开发中。。。。【<a href="exit.jsp">退出系统</a>】  今天是：<%=ft.format(today) %><br>
 在线人数为<%=cournter %>
<%
String uname1 = null;
String sex1 =null;
String profession1 = null;
String favourite1 = null;
String note1 = null;

DBUtil db = new DBUtil();
String sql = "select * from user where uname='"+uname+"'";
ResultSet rs = db.executeQuery(sql);

	while(rs.next()){
	uname1 = rs.getString("uname");
	if(rs.getString("sex").equals("1")){
		sex1 ="女";
	}else{
		sex1="男";
	}
	profession1 = rs.getString("profession");
	favourite1 = rs.getString("favourite");
	note1 = rs.getString("note");
		
	}


%>

<br>姓名：<%=uname %><br>
性别：<%=sex1 %><br>
职业：<%=profession1 %><br>
爱好：<%=favourite1 %><br>
个人简历:<%=note1 %>
</body>
</html>